Optimal. Leaf size=47 \[ 2 a^2 \sqrt {x}+\frac {4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}+\frac {2 b^2 \tan \left (c+d \sqrt {x}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {4204, 3773, 3770, 3767, 8} \[ 2 a^2 \sqrt {x}+\frac {4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}+\frac {2 b^2 \tan \left (c+d \sqrt {x}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3770
Rule 3773
Rule 4204
Rubi steps
\begin {align*} \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx &=2 \operatorname {Subst}\left (\int (a+b \sec (c+d x))^2 \, dx,x,\sqrt {x}\right )\\ &=2 a^2 \sqrt {x}+(4 a b) \operatorname {Subst}\left (\int \sec (c+d x) \, dx,x,\sqrt {x}\right )+\left (2 b^2\right ) \operatorname {Subst}\left (\int \sec ^2(c+d x) \, dx,x,\sqrt {x}\right )\\ &=2 a^2 \sqrt {x}+\frac {4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}-\frac {\left (2 b^2\right ) \operatorname {Subst}\left (\int 1 \, dx,x,-\tan \left (c+d \sqrt {x}\right )\right )}{d}\\ &=2 a^2 \sqrt {x}+\frac {4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}+\frac {2 b^2 \tan \left (c+d \sqrt {x}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 45, normalized size = 0.96 \[ \frac {2 \left (a^2 d \sqrt {x}+2 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )+b^2 \tan \left (c+d \sqrt {x}\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.79, size = 91, normalized size = 1.94 \[ \frac {2 \, {\left (a^{2} d \sqrt {x} \cos \left (d \sqrt {x} + c\right ) + a b \cos \left (d \sqrt {x} + c\right ) \log \left (\sin \left (d \sqrt {x} + c\right ) + 1\right ) - a b \cos \left (d \sqrt {x} + c\right ) \log \left (-\sin \left (d \sqrt {x} + c\right ) + 1\right ) + b^{2} \sin \left (d \sqrt {x} + c\right )\right )}}{d \cos \left (d \sqrt {x} + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.75, size = 88, normalized size = 1.87 \[ \frac {2 \, {\left ({\left (d \sqrt {x} + c\right )} a^{2} + 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, b^{2} \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )^{2} - 1}\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.76, size = 60, normalized size = 1.28 \[ 2 a^{2} \sqrt {x}+\frac {2 b^{2} \tan \left (c +d \sqrt {x}\right )}{d}+\frac {4 a b \ln \left (\sec \left (c +d \sqrt {x}\right )+\tan \left (c +d \sqrt {x}\right )\right )}{d}+\frac {2 a^{2} c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 50, normalized size = 1.06 \[ 2 \, a^{2} \sqrt {x} + \frac {4 \, a b \log \left (\sec \left (d \sqrt {x} + c\right ) + \tan \left (d \sqrt {x} + c\right )\right )}{d} + \frac {2 \, b^{2} \tan \left (d \sqrt {x} + c\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.68, size = 109, normalized size = 2.32 \[ 2\,a^2\,\sqrt {x}+\frac {b^2\,4{}\mathrm {i}}{d\,\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,\sqrt {x}\,2{}\mathrm {i}}+1\right )}+\frac {4\,a\,b\,\ln \left (-\frac {a\,b\,4{}\mathrm {i}}{\sqrt {x}}-\frac {4\,a\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}}{\sqrt {x}}\right )}{d}-\frac {4\,a\,b\,\ln \left (\frac {a\,b\,4{}\mathrm {i}}{\sqrt {x}}-\frac {4\,a\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}}{\sqrt {x}}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 9.75, size = 88, normalized size = 1.87 \[ \begin {cases} \frac {2 a^{2} \left (c + d \sqrt {x}\right ) + 4 a b \log {\left (\tan {\left (c + d \sqrt {x} \right )} + \sec {\left (c + d \sqrt {x} \right )} \right )} + 2 b^{2} \tan {\left (c + d \sqrt {x} \right )}}{d} & \text {for}\: d \neq 0 \\- \sqrt {x} \left (- 2 a^{2} - 4 a b \sec {\relax (c )} - 2 b^{2} \sec ^{2}{\relax (c )}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________